Matthias Clasen [Thu, 7 May 2020 16:49:15 +0000 (12:49 -0400)]
infobar: Add gtk_info_bar_add/remove_child
This is a replacement for container api that is going away.
Matthias Clasen [Thu, 7 May 2020 16:28:33 +0000 (12:28 -0400)]
infobar: Add gtk_info_bar_remove_action_widget
This is mainly for completeness, since gtk_container_remove
will not work for those anymore.
Matthias Clasen [Thu, 7 May 2020 12:30:39 +0000 (08:30 -0400)]
paned: Redo the api
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.
Update all users.
See #2719
Matthias Clasen [Thu, 7 May 2020 05:02:01 +0000 (01:02 -0400)]
paned: Drop some dead code
Matthias Clasen [Thu, 7 May 2020 04:47:25 +0000 (00:47 -0400)]
iconview: Derive from GtkWidget
GtkIconView is not a container.
Matthias Clasen [Thu, 7 May 2020 04:16:08 +0000 (00:16 -0400)]
expander: Derive from GtkWidget
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
See #2719
Matthias Clasen [Thu, 7 May 2020 04:05:51 +0000 (00:05 -0400)]
Use gtk_expander_set_child throughout
Replace all uses of gtk_container_add on expanders
with gtk_expander_set_child.
Matthias Clasen [Thu, 7 May 2020 04:02:42 +0000 (00:02 -0400)]
expander: Add a child property
Matthias Clasen [Thu, 7 May 2020 03:54:11 +0000 (23:54 -0400)]
actionbar: Derive from GtkWidget
GtkContainer is going away.
Matthias Clasen [Thu, 7 May 2020 03:42:32 +0000 (23:42 -0400)]
actionbar: Add gtk_action_bar_remove
This is a replacement for gtk_container_remove.
Matthias Clasen [Tue, 5 May 2020 11:27:04 +0000 (07:27 -0400)]
treeview: Derive from GtkWidget
Drop the GtkContainer vfuncs.
Matthias Clasen [Tue, 5 May 2020 02:40:15 +0000 (22:40 -0400)]
treeview: Stop using container api
Matthias Clasen [Tue, 5 May 2020 02:30:46 +0000 (22:30 -0400)]
textview: Derive from GtkWidget
Drop the GtkContainer vfuncs. As a replacement for
gtk_container_remove, make gtk_text_view_remove public.
Matthias Clasen [Fri, 8 May 2020 23:57:34 +0000 (19:57 -0400)]
dragicon: drop gtkcontainer.h include
We don't need it anymore here.
Matthias Clasen [Tue, 12 May 2020 00:31:14 +0000 (20:31 -0400)]
textviewchild: Don't leak children
Like everybody else, GtkTextViewChild must
unparent its children in dispose.
Matthias Clasen [Fri, 8 May 2020 16:27:25 +0000 (12:27 -0400)]
Fix a leftover window
We were still using container api on a window here.
Matthias Clasen [Fri, 8 May 2020 16:26:50 +0000 (12:26 -0400)]
Fix a leftover list box child
We were still using container api on a list box child here.
Matthias Clasen [Fri, 8 May 2020 05:30:12 +0000 (01:30 -0400)]
window: Fix accessible implementation
Now that GtkWindow is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:29:17 +0000 (01:29 -0400)]
statusbar: Fix accessible implementation
Now that GtkStatusBar is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:28:30 +0000 (01:28 -0400)]
scrolledwindow: Fix accessible implementation
Now that GtkScrolledWindow is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:27:41 +0000 (01:27 -0400)]
popover: Fix accessible implementation
Now that GtkPopover is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:25:49 +0000 (01:25 -0400)]
frame: Fix accessible implementation
Now that GtkFrame is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:24:48 +0000 (01:24 -0400)]
flowboxchild: Fix accessible implementation
Now that GtkFlowBoxChild is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:22:30 +0000 (01:22 -0400)]
combobox: Fix accessible implementation
Now that GtkComboBox is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:20:53 +0000 (01:20 -0400)]
listboxrow: Fix the accessible implementation
GtkListBoxRow is no longer a container, update
the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 05:11:22 +0000 (01:11 -0400)]
button: Fix accessible implementation
Now that GtkButton is no longer a container,
update the accessible implementation to match.
Matthias Clasen [Fri, 8 May 2020 13:13:37 +0000 (09:13 -0400)]
Cosmetics: Replace GtkContainer in an error message
GtkWidget is not that much better here, unfortunately.
Adapt the testsuite to match.
Matthias Clasen [Mon, 11 May 2020 19:08:53 +0000 (19:08 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
print-editor: Bring back the menubar
See merge request GNOME/gtk!1875
Matthias Clasen [Mon, 11 May 2020 18:51:20 +0000 (18:51 +0000)]
Merge branch 'wip/exalm/2242-test' into 'master'
tests: Add a headerbar-in-window test case
See merge request GNOME/gtk!1878
Matthias Clasen [Mon, 11 May 2020 18:40:34 +0000 (18:40 +0000)]
Merge branch 'wip/tintou/doc-fixes' into 'master'
docs: Fix several missing references in the documentation
See merge request GNOME/gtk!1874
Matthias Clasen [Mon, 11 May 2020 18:26:31 +0000 (14:26 -0400)]
printeroptionwidget: Avoid a critical
The new_location can be NULL, as we clearly
knew earlier in the function. We've forgotten
about that by the time we unref it :(
Matthias Clasen [Mon, 11 May 2020 18:25:57 +0000 (14:25 -0400)]
headerbar: Don't clean up other widget children
The parent of the title_widget is the center box,
it needs to call gtk_widget_unparent on it.
Emmanuele Bassi [Mon, 11 May 2020 18:25:39 +0000 (18:25 +0000)]
Merge branch 'cherry-pick-
6d8fb83a' into 'master'
aboutdialog: Update precondition checks for new licenses added in 3.24.20
Closes #2734
See merge request GNOME/gtk!1877
Matthias Clasen [Mon, 11 May 2020 18:23:58 +0000 (14:23 -0400)]
filechooserdialog: Be more careful with widgets
We were stepping on our own toes, by first setting
up a save entry and telling the filechooserwidget
about it, and then nuking it by setting a title
on the headerbar. The filechooserwidget wasn't
ready for the entry to die without anybody telling
it.
This fixes a crash when using the filechooser for
print-to-file in the print dialog.
Alexander Mikhaylenko [Mon, 11 May 2020 17:37:58 +0000 (22:37 +0500)]
tests: Add a headerbar-in-window test case
See https://gitlab.gnome.org/GNOME/gtk/-/issues/2242
Simon McVittie [Mon, 11 May 2020 17:12:08 +0000 (17:12 +0000)]
aboutdialog: Update precondition checks for new licenses added in 3.24.20
To avoid making this mistake again, add a static assertion that the
enum is in sync with gtk_license_info, and use the length of
gtk_license_info for the precondition check.
Signed-off-by: Simon McVittie <smcv@debian.org>
Resolves: #2734
Corentin Noël [Mon, 11 May 2020 16:47:20 +0000 (18:47 +0200)]
docs: Fix several missing references in the documentation
This fixes several typos and missing references
Matthias Clasen [Mon, 11 May 2020 17:15:59 +0000 (17:15 +0000)]
Merge branch 'window-destroy' into 'master'
Drop gtk_widget_destroy
See merge request GNOME/gtk!1864
Matthias Clasen [Mon, 11 May 2020 16:55:15 +0000 (12:55 -0400)]
print-editor: Bring back the menubar
This was the one place where we relied on
the menubar fallback in GtkApplicationWindow.
So turn it on explicitly.
Matthias Clasen [Sun, 10 May 2020 00:01:21 +0000 (20:01 -0400)]
Update the docs
Remove various references to gtk_widget_destroy in the docs.
Matthias Clasen [Sat, 9 May 2020 20:46:40 +0000 (16:46 -0400)]
Unset tooltip window earlier
This avoids a crash when the tooltip window tries
to update its action muxers.
Matthias Clasen [Sat, 9 May 2020 19:55:20 +0000 (15:55 -0400)]
window: Remove _set_has_user_ref_count
Timm Bäder [Tue, 26 Sep 2017 15:04:51 +0000 (17:04 +0200)]
testsuite: add widget refcount test case
Testing toplevels and popovers.
Matthias Clasen [Sat, 9 May 2020 19:45:54 +0000 (15:45 -0400)]
widget: Drop gtk_widget_destroy
Matthias Clasen [Sat, 9 May 2020 19:20:59 +0000 (15:20 -0400)]
window: Implement gtk_window_destroy
Don't call gtk_widget_destroy; instead implement
gtk_window_destroy outselves by removing the window
from the toplevel lista and dropping the reference that
GTK holds.
Matthias Clasen [Sat, 9 May 2020 14:33:02 +0000 (10:33 -0400)]
Replace gtk_widget_destroy everywhere
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
Matthias Clasen [Sat, 9 May 2020 14:26:22 +0000 (10:26 -0400)]
Use gtk_window_destroy
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
Matthias Clasen [Sat, 9 May 2020 13:30:29 +0000 (09:30 -0400)]
window: Add gtk_window_destroy
This is a replacement for gtk_widget_destroy for toplevels.
For now, it is just a wrapper.
Matthias Clasen [Sat, 9 May 2020 20:05:08 +0000 (16:05 -0400)]
nativedialog: Do not ref the transient_for parent
gtk_window_set_transient_for does not ref its parent either. This is
important because a child widget of the parent might be the one calling
this function.
This was showing up as widget-factory not existing on close after
opening the file chooser.
Matthias Clasen [Sat, 9 May 2020 21:31:18 +0000 (17:31 -0400)]
testsuite: Clean up unexpected children
If you call gtk_widget_set_parent on an unsuspecting
parent widget, it is your reponsibility to clean up
before the parent gets finalized.
Matthias Clasen [Sat, 9 May 2020 19:20:15 +0000 (15:20 -0400)]
popover: Fix a reference leak
Don't leak the reference to the default widget.
Matthias Clasen [Sat, 9 May 2020 19:19:39 +0000 (15:19 -0400)]
filechooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent
leakage.
Matthias Clasen [Sat, 9 May 2020 18:14:55 +0000 (14:14 -0400)]
colorchooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent
leakage.
Matthias Clasen [Sat, 9 May 2020 18:10:38 +0000 (14:10 -0400)]
fontchooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent
leakage.
Matthias Clasen [Sat, 9 May 2020 16:09:13 +0000 (12:09 -0400)]
Drop gtk_widget_destroyed
Use g_object_add_weak_pointer or a weak reference instead.
Matthias Clasen [Sat, 9 May 2020 16:03:11 +0000 (12:03 -0400)]
Stop using gtk_widget_destroyed
Replace all internal use of gtk_widget_destroyed
by g_object_add_weak_pointer.
Matthias Clasen [Mon, 11 May 2020 15:52:24 +0000 (15:52 +0000)]
Merge branch 'wip/exalm/test' into 'master'
Fix (most of the) tests
See merge request GNOME/gtk!1873
Matthias Clasen [Mon, 11 May 2020 15:23:40 +0000 (15:23 +0000)]
Merge branch 'teardown-cleanup-2' into 'master'
Treeview teardown cleanup
See merge request GNOME/gtk!1872
Alexander Mikhaylenko [Mon, 11 May 2020 14:57:25 +0000 (19:57 +0500)]
tests: Stop explicitly showing widgets
Alexander Mikhaylenko [Mon, 11 May 2020 15:03:51 +0000 (20:03 +0500)]
tests: Remove redundant image from testdialog
Alexander Mikhaylenko [Mon, 11 May 2020 14:54:32 +0000 (19:54 +0500)]
tests: Connect signal properly for testvolumebutton
Alexander Mikhaylenko [Mon, 11 May 2020 14:53:31 +0000 (19:53 +0500)]
tests: Remove orientation from testvolumebutton
GtkVolumeButton isn't orientable anymore.
Alexander Mikhaylenko [Mon, 11 May 2020 14:51:18 +0000 (19:51 +0500)]
test: Stop using stock-size for teestverticalcells
Alexander Mikhaylenko [Mon, 11 May 2020 14:47:58 +0000 (19:47 +0500)]
tests: Fix testtreeelistmodel
Stop using GtkContainer API for GtkListBoxRow and GtkToggleButton.
Alexander Mikhaylenko [Mon, 11 May 2020 14:32:52 +0000 (19:32 +0500)]
tests: Fix teststackedheader
Connect to signals programmatically.
Matthias Clasen [Sun, 10 May 2020 21:54:49 +0000 (17:54 -0400)]
testsuite: Enable the remaining template tests
These are no longer failing.
Matthias Clasen [Mon, 11 May 2020 14:00:12 +0000 (10:00 -0400)]
treeview: Break reference cycles on unroot
It is a bad idea to have such cycles in the first place,
and there is no need to let them linger past unroot.
This stop the treeview depending on run_dispose to get
freed, a simple unparent will work now.
Alexander Mikhaylenko [Mon, 11 May 2020 14:27:41 +0000 (19:27 +0500)]
tests: Fix teststack "add icon" button
Matthias Clasen [Mon, 11 May 2020 14:24:45 +0000 (14:24 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master
See merge request GNOME/gtk!1867
Alexander Mikhaylenko [Mon, 11 May 2020 14:21:03 +0000 (19:21 +0500)]
tests: Fix testselectionmode
Stop using <packing/> and GtkContainer API for random widgets.
Yuri Chornoivan [Mon, 11 May 2020 14:20:13 +0000 (14:20 +0000)]
Update Ukrainian translation
Alexander Mikhaylenko [Mon, 11 May 2020 14:13:04 +0000 (19:13 +0500)]
tests: Fix testoverlay
Stop using child properties and margin property.
Alexander Mikhaylenko [Mon, 11 May 2020 14:08:56 +0000 (19:08 +0500)]
tests: Simplify testorientable
Since GtkButtonBox is gone, remove the separator and change grid to box.
Alexander Mikhaylenko [Mon, 11 May 2020 14:03:53 +0000 (19:03 +0500)]
tests: Remove testmodelbutton
GtkModelButton is private now, so it can't work anymore.
Alexander Mikhaylenko [Mon, 11 May 2020 13:55:15 +0000 (18:55 +0500)]
tests: Remove use-popover from testmenubutton
The corresponding property doesn't exist anymore.
Alexander Mikhaylenko [Mon, 11 May 2020 13:54:53 +0000 (18:54 +0500)]
tests: Fix testlogout
Stop using GtkApplication::quit signal.
Alexander Mikhaylenko [Mon, 11 May 2020 13:54:23 +0000 (18:54 +0500)]
tests: Fix testiconview
Stop using GtkContainer API for GtkPopover.
Alexander Mikhaylenko [Mon, 11 May 2020 13:39:32 +0000 (18:39 +0500)]
tests: Fix testheightforwidth layout
Stop using child properties and setting visible=true everywhere.
Alexander Mikhaylenko [Mon, 11 May 2020 13:31:59 +0000 (18:31 +0500)]
tests: Expand content for testheaderbar
Alexander Mikhaylenko [Mon, 11 May 2020 13:11:48 +0000 (18:11 +0500)]
tests: Fix testgtk
An assorted collection of fixes.
Matthias Clasen [Mon, 11 May 2020 12:51:08 +0000 (12:51 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #2729 and #2730
See merge request GNOME/gtk!1870
Matthias Clasen [Mon, 11 May 2020 04:17:53 +0000 (00:17 -0400)]
menubutton: Cosmetics
Fix a few typos in the docs.
Matthias Clasen [Mon, 11 May 2020 01:26:19 +0000 (21:26 -0400)]
Refresh the tutorial examples
Redo this series of examples from 2013, and adapt it to modern
way of doing things. The biggest differences are that we use
a headerbar right from the start, and don't mention the app
menu.
Fixes: #2730
Matthias Clasen [Mon, 11 May 2020 00:15:31 +0000 (20:15 -0400)]
applicationswindow: Make show-menubar FALSE by default
The fallback to the menubar is not a good sight,
we should not do that by default.
Matthias Clasen [Sun, 10 May 2020 22:23:32 +0000 (18:23 -0400)]
docs: Cosmetic updates to the tutorial
Since the meson conversion, we are no longer expanding
gtk-doc references in this file, so take them out. And
touch up the wording in various places.
Matthias Clasen [Sun, 10 May 2020 21:13:26 +0000 (17:13 -0400)]
Clean up a leak in a test
One of the treeview tests was calling gtk_widget_destroy
on a child instead of the toplevel, which leaks the toplevel
unnecessarily. Plus, we're moving towards allowing destroy
only on toplevels.
Matthias Clasen [Sun, 10 May 2020 18:07:17 +0000 (14:07 -0400)]
treeviewcolumn: Another case of box <> frame confusion
Don't call your boxes frames, folks!
Matthias Clasen [Sun, 10 May 2020 17:29:40 +0000 (13:29 -0400)]
builderscope: Fix finalize <> dispose confusion
Don't chain up to dispose if you implement finalize.
This fix s courtesy of GOBJECT_DEBUG=objects.
Matthias Clasen [Sun, 10 May 2020 17:18:22 +0000 (13:18 -0400)]
print dialog: Fix frame <> box confusion
It is a bad idea to have a GtkBox called frame, event
if it started out its existence as a GtkFrame.
Matthias Clasen [Sun, 10 May 2020 17:16:52 +0000 (13:16 -0400)]
treeview: Ensure search popover is properly inserted
The css tree and the widget tree are not in sync, so we need
to explicitly set the parent of the css node before inserting
the widget, or else we end up with critical warnings and a
non-working popover.
This can be seen in the print dialog, when moving the focus
to the printer list.
Matthias Clasen [Sun, 10 May 2020 16:59:27 +0000 (12:59 -0400)]
print-editor: Cosmetics
Make the about dialog a bit less barren.
Matthias Clasen [Sun, 10 May 2020 16:53:37 +0000 (12:53 -0400)]
print-editor: Fix a critical
GtkWindow is no longer a container, so don't call
gtk_container_add on it.
Matthias Clasen [Mon, 11 May 2020 11:23:15 +0000 (11:23 +0000)]
Merge branch 'focusable-property' into 'master'
Focusable property
See merge request GNOME/gtk!1834
Emmanuele Bassi [Mon, 11 May 2020 10:02:53 +0000 (10:02 +0000)]
Merge branch 'aperezdc/vk-result-range-size' into 'master'
Fix build issue due to missing VK_RESULT_RANGE_SIZE
See merge request GNOME/gtk!1871
Adrian Perez de Castro [Mon, 11 May 2020 07:07:41 +0000 (10:07 +0300)]
Fix build issue due to missing VK_RESULT_RANGE_SIZE
Conditionally check whether the Vulkan headers version defines
VK_RESULT_RANGE_SIZE, and avoid using it for version >=140. The
following comming in Vulkan-Headers has removed the enum value:
https://github.com/KhronosGroup/Vulkan-Headers/commit/
0c5351f5e9114d3e9033aeae51d036a3d201c082#diff-
4febd94c0666d59030d8b1dd20c72403
Matthias Clasen [Mon, 11 May 2020 04:29:41 +0000 (00:29 -0400)]
Clarify docs around focus.
Matthias Clasen [Mon, 11 May 2020 03:58:30 +0000 (23:58 -0400)]
Remove lots of focus vfuncs
In many cases, the default widget vfuncs work just fine,
combined with setting focusable.
Matthias Clasen [Mon, 11 May 2020 03:42:02 +0000 (23:42 -0400)]
widget: Fix gtk_widget_focus_all for !focusable
This was a case that wasn't handle properly when
the focus is entering from the outside, in forward
direction.
Matthias Clasen [Tue, 5 May 2020 18:57:21 +0000 (14:57 -0400)]
widget: Add a :focusable property
Add back a property that determines whether an individual
widget will accept focus or not. :can-focus prevents the
focus from ever entering the entire widget hierarchy
below a widget, and :focusable just determines if grabbing
the focus to the widget itself will succeed.
See #2686
Alexander Mikhaylenko [Sun, 10 May 2020 23:58:36 +0000 (04:58 +0500)]
tests: Fix testgmenu
GtkMenuButton isn't a GtkButton anymore.